'''
读取“天气预报Json”文件，要求输出苏州市未来3天的温度和天气情况
'''
import json
textFile = open('天气预报json.txt','r',encoding='utf-8')
print(type(textFile))
# 将数据转为python对象
data = json.dumps(json.load(textFile))
data = json.loads(data)
for i in range(3):
    # 获取三天的天气信息
    print(data['result']['future'][i]['date'])
    print(data['result']['future'][i]['temperature'])
    print(data['result']['future'][i]['direct'])
    print(data['result']['future'][i]['weather'])

